<?php
/**
 * Copyright (c) 2006, PORTALIER Julien
 *
 * Licensed under The LGPL License
 * Redistributions of files must retain the above copyright notice.
 *
 * @package      Feather's website
 * @copyright    Copyright (c) 2006, Julien PORTALIER
 * @link         http://feather.portalier.com
 * @license      http://www.opensource.org/licenses/lgpl-license.php The LGPL License
 */

class Group extends Model
{
	public $belongsTo = array('Member');
	
	public $recursiveProcess = Q_PROCESS_LIST;
	public $recursiveFields  = 'name';
	
	function register($member_id, $groups)
	{
		$values = array();
		foreach($groups as $grp)
			array_push($values, array($member_id, $grp));
		$this->saveMany('member_id, name', &$values);
	}
}
?>